﻿<?php
	session_start();
	error_reporting (E_ALL ^ E_NOTICE);
	if($_SESSION["mem_pid"] != "" || $_SESSION["mem_pid"] != NULL){
	//555
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>ADDIVITY - Admin Menu</title>
		<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
		<link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />
	</head>
	<body>
		<div id="templatemo_header_wrapper">
			<div id="templatemo_header">
				<div id="site_title">
					<h1>
						<a href="" target="_parent">
							<img src="images/logo.jpg" alt="Logo" />
							<!-- <span>free website templates</span> -->
						</a>
					</h1>
				</div>
				<div id="search_box">
					<?php //include("./module/login_top.php"); ?>
				</div>
				<div class="cleaner"></div>
			</div>
			<div id="templatemo_menu">
				<ul>
					<?php include("./module/menu_ber_top.php"); ?>
				</ul>
			</div>
			<div id="templatemo_banner">
				<div id="one" class="contentslider">
					<div class="cs_wrapper">
						<div class="cs_slider">
							<?php
								include("./config/conn_database.php");
								$strSQL = "SELECT *
												FROM add_action_user
												WHERE pri_id = '". $_SESSION["pri_id"]."'";
								$objQuery = mysql_query($strSQL);
								//$objResult = mysql_fetch_array($objQuery);
								while($objResult = mysql_fetch_array($objQuery)){
									echo "<div class='cs_article'>";
									echo "<div class='left'>";
									echo "<h2>".$objResult['act_topic']."</h2>";
									echo "<p>".$objResult['act_plot']."</p>";
									if($objResult['act_detail'] != "" || $objResult['act_detail'] != NULL)
									echo "<div class='button'><a href='#'>Read more</a></div>";
									echo "</div>";
									echo "<div class='right'>";
									echo "<a href='#' target='_parent'><img src='./images/act_image/".$objResult['act_image']."' alt='Image' /></a>";
									echo "</div>";
									echo "</div>";
								}
							?>
						</div>
					</div>
				</div>
				<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
				<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
				<script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>
				<script type="text/javascript">
					$(function() {
						$('#one').ContentSlider({
							width : '920px',
							height : '200px',
							speed : 800,
							easing : 'easeInOutBack'
						});
					});
				</script>
				<script src="js/jquery.chili-2.2.js" type="text/javascript"></script>
				<script src="js/chili/recipes.js" type="text/javascript"></script>
				<div class="cleaner"></div>
			</div>
		</div>
		<div id="templatemo_content_wrapper_outer">
			<div id="templatemo_content_wrapper_inner">
				<div id="templatemo_content_wrapper">
					<div id="templatemo_content">
						<h2>รายการจัดการระบบ</h2>

							<ul>
								<li>ปรับแก้ไขหน้าหลักของ ADDIVITY
									<ul>
										<li>ส่วนของแนวความคิดของระบบ - <a href='edit_index_idea.php'>ที่นี้</a></li>
										<li>ส่วนของข่าวของระบบ - <a href='edit_index_news.php'>ที่นี้</a></li>
										<li>ส่วนของกิจกรรมของระบบ - <a href='edit_index_activity.php'>ที่นี้</a></li>
										<li>#ส่วนของโฆษณา - <a href='edit_index_banner.php'>ที่นี้</a></li>
									</ul>
								</li>
							</ul>
			
					</div>
					<div id="templatemo_sidebar">
						<div id="news_section">
							<h2>Activity Now</h2>
							<?php include("./module/activity_now.php"); ?>
							<div class="cleaner"></div>  
						</div>
						<div class="section_rss_twitter">
							<?php
								$i=1;
								while($i<7){
									echo "<div class='rss_twitter twitter'>";
									echo "<a href='#' target='_parent'>Banner Name<span>Banner</span></a>";
									echo "</div>";
									echo "<div class='margin_bottom_20'></div>";
									$i++;
								}
							?>
						</div>
						<div class="cleaner"></div>
					</div>
					<div class="cleaner"></div>
				</div>
			</div>
		</div>
		<div id="templatemo_footer_wrapper">
			<div id="templatemo_footer">
				<ul class="footer_menu">
					<?php include("./module/menu_ber_top.php"); ?>
				</ul>
				Copyright © 2048 <a href="#">ADDIVITY</a> | 
				Designed by <a href="http://www.templatemo.com" target="_parent">templatemo.com</a>
			</div>
		</div>
	</body>
</html>
<?php
	mysql_close($objConnect);
}else{	
	echo "<script type='text/javascript'>";
	echo "alert('กรุณาเข้าสู่ระบบก่อนเข้าใช้งาน')";
	echo "</script>";
	echo "<meta http-equiv='refresh' content='0; url=index.php'>";
}
?>
